Field of the Invention
This invention relates to allocation of data storage and more particularly relates to allocation of data storage at a non-volatile storage device, such as a solid-state storage device.
Description of the Related Art
Typical data storage devices are block storage devices where there is a near one-to-one mapping between logical block addresses (“LBAs”) and physical block addresses (“PBAs”). Usually a single exception to the one-to-one mapping between LBAs and PBAs is that the data storage device may have a small quantity of extra blocks that can be remapped to blocks that are determined to be bad. Based on this one-to-one mapping between LBAs and PBAs, higher level mapping between LBAs and object names, file names, and other logical identifiers is done in a file server or file system. Typically the data storage device where this one-to-one mapping between LBAs and PBAs is used is a random access storage device. The file server or file system may use Small Computer System Interface (“SCSI”) commands to send blocks of data assigned to specific LBAs to the data storage device. For typical storage devices, LBAs are allocated when the data storage device is initialized. In this case, allocation of LBAs is an assignment of a range or list of LBAs that are available on the data storage device to a client or computer connected to the file server or file system connected to the data storage device.
In a system where a server or other computer has access to more than one data storage device, if the data storage devices are random access devices, the file server or file system typically includes an additional identifier with each LBA to identify the particular data storage device being accessed. The identifier may be a drive name, a unique identifier assigned at the manufacturer of the storage device, a logical name, or other identifier that can be used to distinguish between the various data storage devices accessible in the system. In this system, clients may access the data storage device through one or more servers. Each client may be allocated storage space. The allocated storage space may be an entire storage device, may be a portion of a storage device, or may be all or part of two or more storage devices. Typically, for a system where two or more storage devices are accessible to a server or client in the system, allocation of storage space and corresponding addresses will be done in a file server or file system connected to the storage devices. Typically, a file system manages the assigned and unassigned LBAs. Unassigned LBAs are placed in a free LBA pool. When a new file is created, LBAs are removed from the free LBA pool and associated with the file. When the file is deleted, the LBAs are returned to the free LBA pool.
In a data storage device where there is not a one-to-one correspondence between LBAs and PBAs, such as a sequential storage device or a log structured storage device, there is typically another level of logical-to-physical mapping that is similar to the logical-to-logical mapping that is present in a file system or file server connected to a random access storage device. These devices manage their own LBA usage, redundantly to any file system accessing the device. This duplication makes it advantageous for the file system to implement a “trim command” to provide a hint to the device that the file system is moving an LBA into the free LBA pool so that the device can do likewise. Additional logical-to-logical mappings may exist to support other intermediate transformations such as in support of a thin provisioning layer. In a sequential storage device, log structured file system, or other similar device, the logical-to-logical mapping in the file system/file server plus the additional logical-to-logical and/or logical-to-physical mappings are inefficient, add complexity, and in some cases are redundant.